# -*- coding: utf-8 -*- 
"""
Project: AppleSnApi
Creator: k
Create time: 2025-06-16 11:19
IDE: PyCharm
Introduction:
"""
import os

# base dir
BASE_DIR = os.path.abspath(os.path.dirname(__file__))  # 获取项目所在目录

# file dir
FILE_DIR = os.path.join(BASE_DIR, "file")  # 存储配置信息
if not os.path.exists(FILE_DIR):
    os.mkdir(FILE_DIR)

# log dir
LOG_DIR = os.path.join(BASE_DIR, "log")  # 存储配置信息
if not os.path.exists(LOG_DIR):
    os.mkdir(LOG_DIR)

REDIS_CONFIG = {
    "host": "xxxxxxx",
    "password": "xxxx",
    "port": 6379,
    "socket_timeout": 10,
    "decode_responses": True,
    "encoding": 'utf-8',
    "max_connections": 1024,
    "health_check_interval": 30,
    "retry_on_timeout": True
}

MYSQL_CONF = {
    "host": "xxxxx",
    "port": 3306,
    "user": "xxx",
    "password": "xxxxx",
    "charset": "utf8",
    'database': 'xxx'
}

MONGO_CONF = 'mongodb://rwuser:xxxx@xxxxx,xxxxx/test?authSource=admin&replicaSet=replica'

# 接口安全配置
XTOKEN = "xxxxxx"
SECRET = "xxxxxx"
